﻿@model List<ASPMVC_first_app.Models.UserModel>
@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@if(Model.Count==0)
{
    <h3>There are no users fcking asshole</h3>
}
else
{
    <table class="table">
        <tr>
            <td><b>Id</b></td>
            <td><b>Name</b></td>
        </tr>

        @foreach (var item in Model)
        {
            <tr>
                <td>@item.Id</td>
                <td>@Html.ActionLink(@item.FirstName + " " + @item.LastName, "UserInfo", "User", new { id = item.Id }, null)</td>

            </tr>
        }
    </table>
}

